<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of PaymentManagementForm
 *
 * @author Sorasak Siangsanan
 */
class PaymentManagementForm extends CFormModel {

    public $payment_id;
    public $order_id;
    public $bank;
    public $bank_branch;
    public $time;
    public $full_name;
    public $amount;
    public $create_date;

    public function rules() {
        return array(
            array('filter', 'required'),
        );
    }

    public function attributeLabels() {
        return array(
            'order_id' => Yii::t('paymentmanagement', 'order_id')
        );
    }

    public function search() {
        $criteria = new CDbCriteria;
        $criteria->addSearchCondition('t.payment_id', $this->payment_id);
        return new CActiveDataProvider(get_class($this), array(
            'criteria' => $criteria)
        );
    }

}
